/**
 * @Author: Caven
 * @Date: 2020-01-15 20:31:46
 */
import mapImage from '@/assets/js/map/mapImagery.js'
class TdtImageryProvider extends Cesium.UrlTemplateImageryProvider {
  constructor(options = {}) {
    const MAP_URL = options.mapImage.url || mapImage['天地图-矢量底图'].url
    super({
      url: MAP_URL.replace(
        /\{token\}/g,
        options.token || ''
      ),
      subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
      tilingScheme: new Cesium.WebMercatorTilingScheme(),
      maximumLevel: 18
    })
  }
}

export default TdtImageryProvider
